
/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  August 27th 2009 4:23:31 PM PDT                              */
/*      Machine:  10.16.140.103                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/5h4heo2ub68sogs4.pkg.js h:1xkawojl                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/5h4heo2ub68sogs4.pkg.js                                   */
function gen_unique() {
	return ++gen_unique._counter;
}
gen_unique._counter = 0;
function create_hidden_input(name, value) {
	return $N("input", {name:name, id:name, value:value, type:"hidden"});
}
function getTableRowShownDisplayProperty() {
	if (ua.ie() < 8) {
		return "inline";
	} else {
		return "table-row";
	}
}
function showTableRow() {
	for (var i = 0; i < arguments.length; i++) {
		var element = ge(arguments[i]);
		if (element && element.style) {
			element.style.display = getTableRowShownDisplayProperty();
		}
	}
	return false;
}
function getParentRow(el) {
	el = ge(el);
	while (el.tagName && el.tagName != "TR") {
		el = el.parentNode;
	}
	return el;
}
function abTest(data, inline) {
	AsyncRequest.pingURI("/ajax/abtest.php", {data:data, "post_form_id":null}, true);
	return !inline;
}
function ac(metadata) {
	new AsyncSignal("/ajax/ac.php", {"meta":metadata}).send();
	return true;
}
function scribe_log(category, message) {
	AsyncRequest.pingURI("/ajax/scribe_log.php", {"category":category, "message":message, "post_form_id":null}, true);
}
function warn_if_unsaved(form_id) {
	var form = ge(form_id);
	if (!form) {
		Util.error("warn_if_unsaved couldn't find form in order to save its " + "original state.  This is probably because you called " + "render_start_form_with_unsaved_warning to render a form, " + "but then didn't echo it into page.  To get around this, you " + "can call render_start_form, and then call warn_if_unsaved " + "yourself once you've caused the form to appear.");
		return;
	}
	if (!_unsaved_forms_to_check_for) {
		_unsaved_forms_to_check_for = {};
		LinkController.registerHandler(_check_for_unsaved_forms);
	}
	form.original_state = serialize_form(form);
	_unsaved_forms_to_check_for[form_id] = true;
}
function _check_for_unsaved_forms(link) {
	for (var form_id in _unsaved_forms_to_check_for) {
		var form = ge(form_id);
		if (form && !form.is_inactive && form.original_state && !are_equal(form.original_state, serialize_form(form))) {
			var href = link.href;
			var submit = _find_first_submit_button(form);
			var buttons = [];
			if (submit) {
				buttons.push({name:"save", label:_tx("Save"), handler:function () {
					submit.click();
				}});
			}
			buttons.push({name:"dont_save", label:_tx("Don't Save"), className:"inputaux", handler:function () {
				window.location.href = href;
			}});
			buttons.push(Dialog.CANCEL);
			new Dialog().setTitle(_tx("Unsaved Changes")).setBody(_tx("Some of your changes have not been saved.  Would you like to save your changes now?")).setButtons(buttons).setModal().show();
			return false;
		}
	}
}
function _find_first_submit_button(root_element) {
	var inputs = root_element.getElementsByTagName("input");
	for (var i = 0; i < inputs.length; ++i) {
		if (inputs[i].type.toUpperCase() == "SUBMIT") {
			return inputs[i];
		}
	}
	return null;
}
_unsaved_forms_to_check_for = undefined;
function textLimit(ta, count) {
	var text = ge(ta);
	if (text.value.length > count) {
		text.value = text.value.substring(0, count);
		if (arguments.length > 2) {
			$(arguments[2]).style.display = "block";
		}
	}
}
function textLimitStrict(text_id, limit, message_id, count_id, submit_id) {
	var text = ge(text_id);
	if (text) {
		var len = text.value.length;
		var diff = len - limit;
		if (diff > 0) {
			if (diff > 25000) {
				text.value = text.value.substring(0, limit + 25000);
				diff = 25000;
			}
			$(message_id).style.display = "block";
			$(count_id).innerHTML = diff;
			$(submit_id).disabled = true;
		} else {
			if (len == 0) {
				$(message_id).style.display = "none";
				$(submit_id).disabled = true;
				$(count_id).innerHTML = 1;
			} else {
				if ($(count_id).innerHTML != 0) {
					$(count_id).innerHTML = 0;
					$(message_id).style.display = "none";
					$(submit_id).disabled = false;
				}
			}
		}
	}
}
function city_selector_onfound(input, obj) {
	input.value = obj ? obj.i : -1;
}
function city_selector_onselect(success) {
	if (window[success]) {
		window[success]();
	}
}
onloadRegister(function () {
	var secrets = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13], ii = 0;
	function fn(evt) {
		var kk = evt ? evt.keyCode : event.keyCode;
		if (ii == -1) {
			return;
		} else {
			if (secrets[ii] == kk) {
				++ii;
				if (ii == secrets.length) {
					new AsyncRequest("/ajax/lensflare.php").setReadOnly(true).setMethod("GET").send();
					ii = -1;
				}
			} else {
				if (ii) {
					ii = 0;
				}
			}
		}
	}
	addEventBase(document, "keydown", fn);
});
function delay_add_class(element, class_name, delay) {
	var timeout_id = null;
	var doc_listener = null;
	var doc_handler = function (e) {
		if (!DOM.contains(element, e.getTarget())) {
			clearTimeout(timeout_id);
			CSS.removeClass(element, class_name);
			doc_listener && doc_listener.remove();
		}
	};
	var add = function () {
		timeout_id = setTimeout(CSS.addClass.bind(null, element, class_name), delay || 0);
		doc_listener = Event.listen(document, "mousemove", doc_handler);
	};
	Event.listen(element, "mouseenter", add);
}
function generic_dialog(className, modal) {
	this.className = className;
	this.content = null;
	this.obj = null;
	this.popup = null;
	this.overlay = null;
	this.modal = null;
	this.iframe = null;
	this.hidden_objects = [];
	if (modal == true) {
		this.modal = true;
	}
}
generic_dialog.dialog_stack = null;
generic_dialog.prototype.setClassName = function (className) {
	if (this.obj) {
		CSS.addClass(this.obj, className);
	}
	this.className = className;
};
generic_dialog.hide_all = function () {
	if (generic_dialog.dialog_stack !== null) {
		var stack = generic_dialog.dialog_stack.clone();
		generic_dialog.dialog_stack = null;
		for (var i = stack.length - 1; i >= 0; i--) {
			stack[i].hide();
		}
	}
};
generic_dialog.prototype.should_hide_objects = !ua.windows();
generic_dialog.prototype.should_use_iframe = ua.ie() < 7 || (ua.osx() && ua.firefox());
generic_dialog.prototype.show_dialog = function (content) {
	if (generic_dialog.dialog_stack === null) {
		onunloadRegister(generic_dialog.hide_all, true);
	}
	if (!this.obj) {
		this.build_dialog();
	}
	if (typeof (content) == "string") {
		content = HTML(content).setDeferred(true);
	}
	DOM.setContent(this.content, content);
	var imgs = this.content.getElementsByTagName("img");
	for (var i = 0; i < imgs.length; i++) {
		imgs[i].onload = chain(imgs[i].onload, this.hide_objects.bind(this));
	}
	this.show();
	this._focus_first_textbox_or_button.bind(this).defer();
	return this;
};
generic_dialog.prototype._focus_first_textbox_or_button = function () {
	var selectors = ["input[type=\"text\"]", "textarea", "input[type=\"password\"]", "input[type=\"button\"]", "input[type=\"submit\"]"];
	var nodes = [];
	for (var ii = 0; ii < selectors.length && nodes.length == 0; ii++) {
		nodes = DOM.scry(this.content, selectors[ii]);
	}
	if (nodes.length > 0) {
		var node = nodes[0];
		try {
			if (elementY(node) > 0 && elementX(node) > 0) {
				node.focus();
			}
		}
		catch (e) {
		}
	}
	return true;
};
generic_dialog.prototype.make_modal = function () {
	if (this.modal) {
		return;
	}
	this.modal = true;
	if (ua.ie() == 7) {
		this.build_iframe();
	}
	this.build_overlay();
	this.reset_iframe();
};
generic_dialog.prototype.show_loading = function (loading_html) {
	if (!loading_html) {
		loading_html = _tx("Loading...");
	}
	return this.show_dialog("<div class=\"dialog_loading\">" + loading_html + "</div>");
};
generic_dialog.prototype._show_ajax_dialog_custom_loader = function (html, src, post_vars, use_async_response) {
	if (html) {
		this.show_loading(html);
	}
	var handler = function (use_async_response, response) {
		var html = use_async_response ? response.getPayload() : response.getPayload().responseText;
		this.show_dialog(html);
	}.bind(this, use_async_response);
	var error_handler = function (response) {
		ErrorDialog.showAsyncError(response);
		this.hide(false);
	}.bind(this);
	var async = new AsyncRequest().setOption("suppressEvaluation", !use_async_response).setURI(src).setData(post_vars || {}).setHandler(handler).setErrorHandler(error_handler).setTransportErrorHandler(error_handler);
	if (!post_vars) {
		async.setMethod("GET").setReadOnly(true);
	}
	async.send();
	return this;
};
generic_dialog.prototype.show_ajax_dialog = function (src, post_vars, use_async_response) {
	post_vars = post_vars || false;
	var load = _tx("Loading...");
	return this._show_ajax_dialog_custom_loader(load, src, post_vars, use_async_response);
};
generic_dialog.prototype.show_prompt = function (title, content) {
	return this.show_dialog("<h2 class=\"dialog_title\"><span>" + title + "</span></h2><div class=\"dialog_content\">" + content + "</div>");
};
generic_dialog.prototype.show_message = function (title, content, button) {
	if (button == null) {
		button = _tx("Okay");
	}
	return this.show_choice(title, content, button, function () {
		generic_dialog.get_dialog(this).fade_out(100);
	});
};
generic_dialog.prototype.show_choice = function (title, content, button1, button1js, button2, button2js, buttons_msg, button3, button3js) {
	var buttons = "<div class=\"dialog_buttons\" id=\"dialog_buttons\">";
	if (typeof (buttons_msg) != "undefined") {
		buttons += "<div class=\"dialog_buttons_msg\">";
		buttons += buttons_msg;
		buttons += "</div>";
	}
	buttons += "<input class=\"inputsubmit\" type=\"button\" value=\"" + button1 + "\" id=\"dialog_button1\" />";
	if (button2) {
		var button2_class = "inputsubmit";
		if (button2 == _tx("Cancel")) {
			button2_class += " inputaux";
		}
		buttons += "<input class=\"" + button2_class + "\" type=\"button\" value=\"" + button2 + "\" id=\"dialog_button2\" />";
	}
	if (button3) {
		var button3_class = "inputsubmit";
		if (button3 == _tx("Cancel")) {
			button3_class += " inputaux";
		}
		buttons += "<input class=\"" + button3_class + "\" type=\"button\" value=\"" + button3 + "\" id=\"dialog_button3\" />";
	}
	this.show_prompt(title, this.content_to_markup(content) + buttons);
	var inputs = this.obj.getElementsByTagName("input");
	if (button3) {
		button1obj = inputs[inputs.length - 3];
		button2obj = inputs[inputs.length - 2];
		button3obj = inputs[inputs.length - 1];
	} else {
		if (button2) {
			button1obj = inputs[inputs.length - 2];
			button2obj = inputs[inputs.length - 1];
		} else {
			button1obj = inputs[inputs.length - 1];
		}
	}
	if (button1js && button1) {
		if (typeof button1js == "string") {
			eval("button1js = function() {" + button1js + "}");
		}
		button1obj.onclick = button1js;
	}
	if (button2js && button2) {
		if (typeof button2js == "string") {
			eval("button2js = function() {" + button2js + "}");
		}
		button2obj.onclick = button2js;
	}
	if (button3js && button3) {
		if (typeof button3js == "string") {
			eval("button3js = function() {" + button3js + "}");
		}
		button3obj.onclick = button3js;
	}
	if (!this.modal) {
		document.onkeyup = function (e) {
			var keycode = (e && e.which) ? e.which : event.keyCode;
			var btn2_exists = (typeof button2obj != "undefined");
			var btn3_exists = (typeof button3obj != "undefined");
			var is_webkit = ua.safari();
			if (is_webkit && keycode == 13) {
				button1obj.click();
			}
			if (keycode == 27) {
				if (btn3_exists) {
					button3obj.click();
				} else {
					if (btn2_exists) {
						button2obj.click();
					} else {
						button1obj.click();
					}
				}
			}
			document.onkeyup = function () {
			};
		};
		this.button_to_focus = button1obj;
		button1obj.offsetWidth && button1obj.focus();
	}
	return this;
};
generic_dialog.prototype.content_to_markup = function (content) {
	return (typeof content == "string") ? "<div class=\"dialog_body\">" + content + "</div>" : "<div class=\"dialog_summary\">" + content.summary + "</div><div class=\"dialog_body\">" + content.body + "</div>";
};
generic_dialog.prototype.hide = function (temporary) {
	if (this.obj) {
		this.obj.style.display = "none";
	}
	if (this.iframe) {
		this.iframe.style.display = "none";
	}
	if (this.overlay) {
		this.overlay.style.display = "none";
	}
	if (this.timeout) {
		clearTimeout(this.timeout);
		this.timeout = null;
		return;
	}
	if (this.hidden_objects.length) {
		for (var i = 0, il = this.hidden_objects.length; i < il; i++) {
			this.hidden_objects[i].style.visibility = "";
		}
		this.hidden_objects = [];
	}
	clearInterval(this.active_hiding);
	if (!temporary) {
		if (generic_dialog.dialog_stack) {
			var stack = generic_dialog.dialog_stack;
			for (var i = stack.length - 1; i >= 0; i--) {
				if (stack[i] == this) {
					stack.splice(i, 1);
				}
			}
			if (stack.length) {
				stack[stack.length - 1].show();
			}
		}
		if (this.obj) {
			this.obj.parentNode.removeChild(this.obj);
			this.obj = null;
		}
		if (this.close_handler) {
			this.close_handler();
		}
	}
	return this;
};
generic_dialog.prototype.fade_out = function (interval, timeout, callback) {
	if (!this.popup) {
		return this;
	}
	try {
		animation(this.obj).duration(timeout || 0).checkpoint().to("opacity", 0).hide().duration(interval || 350).ondone(function () {
			callback && callback();
			this.hide();
		}.bind(this)).go();
	}
	catch (e) {
		this.hide();
	}
	return this;
};
generic_dialog.prototype.show = function () {
	if (this.obj && this.obj.style.display) {
		this.obj.style.visibility = "hidden";
		this.obj.style.display = "";
		this.reset_dialog();
		this.obj.style.visibility = "";
		this.obj.dialog = this;
	} else {
		this.reset_dialog();
	}
	this.hide_objects();
	clearInterval(this.active_hiding);
	this.active_hiding = setInterval(this.active_resize.bind(this), 500);
	var stack = generic_dialog.dialog_stack ? generic_dialog.dialog_stack : generic_dialog.dialog_stack = [];
	if (stack.length) {
		var current_dialog = stack[stack.length - 1];
		if (current_dialog != this && !current_dialog.is_stackable) {
			current_dialog.hide();
		}
	}
	for (var i = stack.length - 1; i >= 0; i--) {
		if (stack[i] == this) {
			stack.splice(i, 1);
		} else {
			stack[i].hide(true);
		}
	}
	stack.push(this);
	return this;
};
generic_dialog.prototype.active_resize = function () {
	if (this.last_offset_height != this.content.offsetHeight) {
		this.hide_objects();
		this.last_offset_height = this.content.offsetHeight;
	}
};
generic_dialog.prototype.hide_objects = function () {
	var hide = [], objects = [];
	var ad_locs = ["", 0, 1, 2, 4, 5, 9, 3];
	for (var i = 0; i < ad_locs.length; i++) {
		var ad_div = ge("ad_" + ad_locs[i]);
		if (ad_div != null) {
			hide.push(ad_div);
		}
	}
	var rect = {x:elementX(this.content), y:elementY(this.content), w:this.content.offsetWidth, h:this.content.offsetHeight};
	if (this.should_hide_objects) {
		var iframes = document.getElementsByTagName("iframe");
		for (var i = 0; i < iframes.length; i++) {
			if (iframes[i].className.indexOf("share_hide_on_dialog") != -1) {
				objects.push(iframes[i]);
			}
		}
	}
	var swfs = [].concat($A(DOM.scry(document.body, "embed")), $A(DOM.scry(document.body, "object")));
	for (var i = 0; i < swfs.length; i++) {
		if ((swfs[i].getAttribute("wmode") || "").toLowerCase() != "transparent" || this.should_hide_objects) {
			objects.push(swfs[i]);
		}
	}
	for (var i = 0; i < objects.length; i++) {
		var node = objects[i].offsetHeight ? objects[i] : objects[i].parentNode;
		swf_rect = {x:elementX(node), y:elementY(node), w:node.offsetWidth, h:node.offsetHeight};
		if (!DOM.contains(this.content, objects[i]) && rect.y + rect.h > swf_rect.y && swf_rect.y + swf_rect.h > rect.y && rect.x + rect.w > swf_rect.x && swf_rect.x + swf_rect.w > rect.w && this.hidden_objects.indexOf(node) == -1) {
			hide.push(node);
		}
	}
	for (var i = 0; i < hide.length; i++) {
		this.hidden_objects.push(hide[i]);
		hide[i].style.visibility = "hidden";
	}
};
generic_dialog.prototype.build_dialog = function () {
	if (!this.obj) {
		this.obj = document.createElement("div");
	}
	CSS.setClass(this.obj, "generic_dialog" + (this.className ? " " + this.className : ""));
	this.obj.style.display = "none";
	onloadRegister(function () {
		DOM.getRootElement().appendChild(this.obj);
	}.bind(this));
	if (this.should_use_iframe || (this.modal && ua.ie() == 7)) {
		this.build_iframe();
	}
	if (!this.popup) {
		this.popup = document.createElement("div");
		CSS.setClass(this.popup, "generic_dialog_popup");
	}
	this.popup.style.left = this.popup.style.top = "";
	this.obj.appendChild(this.popup);
	if (this.modal) {
		this.build_overlay();
	}
};
generic_dialog.prototype.build_iframe = function () {
	if (!this.iframe && !(this.iframe = ge("generic_dialog_iframe"))) {
		this.iframe = document.createElement("iframe");
		this.iframe.id = "generic_dialog_iframe";
		this.iframe.src = "/common/blank.html";
	}
	this.iframe.frameBorder = "0";
	onloadRegister(function () {
		DOM.getRootElement().appendChild(this.iframe);
	}.bind(this));
};
generic_dialog.prototype.build_overlay = function () {
	this.overlay = document.createElement("div");
	this.overlay.id = "generic_dialog_overlay";
	this.overlay.style.height = Vector2.getDocumentDimensions().y + "px";
	onloadRegister(function () {
		DOM.getRootElement().appendChild(this.overlay);
	}.bind(this));
};
generic_dialog.prototype.reset_dialog = function () {
	if (!this.popup) {
		return;
	}
	onloadRegister(function () {
		this.reset_dialog_obj();
		this.reset_iframe();
	}.bind(this));
};
generic_dialog.prototype.reset_iframe = function () {
	if (!this.should_use_iframe && !(this.modal && ua.ie() == 7)) {
		return;
	}
	if (this.modal) {
		this.iframe.style.left = "0px";
		this.iframe.style.top = "0px";
		this.iframe.style.width = "100%";
		var documentHeight = Vector2.getDocumentDimensions().y;
		if (documentHeight > 10000) {
			documentHeight = 10000;
		}
		this.iframe.style.height = documentHeight + "px";
	} else {
		this.iframe.style.left = elementX(this.frame) + "px";
		this.iframe.style.top = elementY(this.frame) + "px";
		this.iframe.style.width = this.frame.offsetWidth + "px";
		this.iframe.style.height = this.frame.offsetHeight + "px";
	}
	this.iframe.style.display = "";
};
generic_dialog.prototype.reset_dialog_obj = function () {
};
generic_dialog.get_dialog = function (obj) {
	while (!obj.dialog && obj.parentNode) {
		obj = obj.parentNode;
	}
	return obj.dialog ? obj.dialog : false;
};
function pop_dialog(className, deprecated, modal) {
	this.top = 125;
	this.parent.construct(this, className, modal);
}
pop_dialog.extend("generic_dialog");
pop_dialog.prototype.do_expand_animation = false;
pop_dialog.prototype.kill_expand_animation = true;
pop_dialog.prototype.show_ajax_dialog = function (src, post_vars, title, use_async_response) {
	post_vars = post_vars || false;
	if (this.do_expand_animation && !this.kill_expand_animation) {
		var load = null;
		this.show_loading_title(title);
	} else {
		var load = _tx("Loading...");
	}
	return this._show_ajax_dialog_custom_loader(load, src, post_vars, use_async_response);
};
pop_dialog.prototype.show_message = function (title, content, button) {
	if (this.do_expand_animation && !this.kill_expand_animation) {
		this.show_loading_title(title);
	} else {
		this.show_loading();
	}
	return this.parent.show_message(title, content, button);
};
pop_dialog.prototype.show_dialog = function (content, prevent_expand_animation) {
	var new_dialog = this.parent.show_dialog(content);
	if (this.do_expand_animation && !prevent_expand_animation && !this.kill_expand_animation) {
		function check_done_loading_title(callback, i) {
			var i = (i ? i : 0);
			if (this.done_loading_title != true && i < 10) {
				i++;
				setTimeout(check_done_loading_title.bind(this, callback, i), 50);
			} else {
				callback && callback();
			}
		}
		function check_for_complete_images(content, callback, attempt) {
			var complete_images = 0;
			var images = content.getElementsByTagName("img");
			var safari2 = ua.safari() < 3;
			for (var i = 0; i < images.length; i++) {
				var imageobj = images[i];
				if (image_has_loaded(imageobj)) {
					complete_images++;
				}
			}
			if (complete_images != images.length) {
				if (attempt < 20) {
					attempt++;
					setTimeout(function () {
						check_for_complete_images(content, callback, attempt);
					}, 100);
				} else {
					callback();
				}
			} else {
				callback();
			}
		}
		var divs = this.content.getElementsByTagName("div");
		for (var i = 0; i < divs.length; i++) {
			if (divs[i].className == "dialog_content") {
				expand_animation_div = divs[i];
				break;
			}
		}
		var container_div = document.createElement("div");
		container_div.style.padding = "0px";
		container_div.style.margin = "0px";
		container_div.style.overflow = "visible";
		expand_animation_div.parentNode.insertBefore(container_div, expand_animation_div);
		container_div.appendChild(expand_animation_div);
		expand_animation_div.style.overflow = "hidden";
		check_for_complete_images(expand_animation_div, function () {
			check_done_loading_title.bind(this, function () {
				this.content.getElementsByTagName("h2")[0].className = "";
				animation(expand_animation_div).to("height", "auto").from(0).from("opacity", 0).to(1).ease(animation.ease.both).show().duration(200).ondone(function () {
					container_div.parentNode.insertBefore(expand_animation_div, container_div);
					container_div.parentNode.removeChild(container_div);
					if (!this.button_to_focus) {
						var inputs = this.obj.getElementsByTagName("input");
						for (var i = 0; i < inputs.length; i++) {
							if (inputs[i].type == "button" && inputs[i].id == "dialog_button1") {
								this.button_to_focus = inputs[i];
								break;
							}
						}
					}
					if (this.button_to_focus) {
						setTimeout(function () {
							this.button_to_focus.focus();
						}.bind(this), 50);
					}
					expand_animation_div.style.overflow = "visible";
					this.do_expand_animation = false;
					this.show();
				}.bind(this, {expand_animation_div:expand_animation_div, container_div:container_div})).go();
			}.bind(this))();
		}.bind(this, {expand_animation_div:expand_animation_div}), 0);
	}
	return new_dialog;
};
pop_dialog.prototype.build_dialog = function () {
	this.parent.build_dialog();
	CSS.addClass(this.obj, "pop_dialog");
	if (intl_locale_is_rtl()) {
		CSS.addClass(this.obj, "pop_dialog_rtl");
	}
	var markup;
	if (ua.ie() <= 6) {
		markup = "<div class=\"pop_squarecontainer\">" + "<div class=\"pop_squareborder pop_borderopacity\"></div>" + "<div class=\"pop_content popcontent_old\" id=\"pop_content\"></div>" + "</div>";
	} else {
		if (ua.firefox() >= 3 || ua.safari() >= 3) {
			markup = "<div class=\"pop_content popcontent_advanced\" id=\"pop_content\"></div>";
		} else {
			markup = "<div class=\"pop_container\">" + "<div class=\"pop_verticalslab\"></div>" + "<div class=\"pop_horizontalslab\"></div>" + "<div class=\"pop_topleft\"></div>" + "<div class=\"pop_topright\"></div>" + "<div class=\"pop_bottomright\"></div>" + "<div class=\"pop_bottomleft\"></div>" + "<div class=\"pop_content popcontent_old\" id=\"pop_content\"></div>" + "</div>";
		}
	}
	set_inner_html(this.popup, markup);
	this.frame = DOM.find(this.popup, "div.pop_content");
	this.content = this.frame;
};
pop_dialog.prototype.reset_dialog_obj = function () {
	this.popup.style.top = Vector2.getScrollPosition().y + this.top + "px";
};
pop_dialog.prototype.show_prompt = function (title, content) {
	if (!this.do_expand_animation || this.kill_expand_animation) {
		return this.show_dialog("<h2 class=\"dialog_title\"><span>" + title + "</span></h2><div class=\"dialog_content\">" + content + "</div>");
	}
	return this.show_dialog("<h2 class=\"dialog_loading\"><span>" + title + "</span></h2><div class=\"dialog_content\" style=\"display:none;\">" + content + "</div>");
};
pop_dialog.prototype.show_loading_title = function (title) {
	if (!this.kill_expand_animation) {
		this.do_expand_animation = true;
		this.show_dialog("<h2 class=\"dialog_loading\"><span>" + title + "</span></h2>", true);
		setTimeout(function () {
			this.done_loading_title = true;
		}.bind(this), 200);
	} else {
		this.show_loading();
	}
};
var kError_Global_ValidationError = 1346001, kError_Login_GenericError = 1348009, kError_Chat_NotAvailable = 1356002, kError_Chat_SendOtherNotAvailable = 1356003, kError_Async_NotLoggedIn = 1357001, kError_Async_LoginChanged = 1357003, kError_Async_CSRFCheckFailed = 1357004, kError_Chat_TooManyMessages = 1356008, kError_Platform_CallbackValidationFailure = 1349007, kError_Platform_ApplicationResponseInvalid = 1349008, kError_FBPayments_Unknown = 1383001, kError_FBPayments_InvalidParameters = 1383002, kError_Gifts_NoGiftSelected = 1391001, kError_Gifts_NoReceiverSpecified = 1391003, kError_Gifts_NoMessageAttached = 1391004, kError_Async_InternalCaptchaRequired = 1357007, kError_Recruiting_MessageDeliveryFailed = 1405001, kError_FBPayments_PaymentFailure = 1383003, kError_Intern_UnknownError = 1408001, kError_Privacy_FriendListNameAlreadyExists = 1409001, kError_Mobile_InvalidWapLocale = 1347008, kError_Gifts_MessageTooLong = 1391007, kError_Inbox_DuplicateMessages = 1415001, kError_Async_ConfirmationRequired = 1357008, kError_Gifter_GiftNotMoved = 1416001, kError_Gifter_GiftNotCreated = 1416002, kError_Gifter_GiftNotUpdated = 1416003, kError_Gifter_DesignerNotAdded = 1416004, kError_Gifter_GiftsNotLoaded = 1416005, kError_Megaphone_InvalidHideData = 1419001, kError_Megaphone_StoryNotFound = 1419002, kError_Megaphone_InternalError = 1419003, kError_Megaphone_HandleHideFailed = 1419004, kError_Screenname_LimiteExceeded = 1423001, kError_Screenname_AllocationError = 1423002, kError_OpenId_RegistrationGeneralError = 1428001, kError_OpenId_SignatureError = 1428002, kError_OpenId_MissingRequiredInformation = 1428003, kError_OpenId_ProtocolError = 1428004, kError_OpenId_ProtocolErrorWithMessage = 1428005, kError_OpenId_EmailAlreadyTaken = 1428006, kError_ProfileConnect_AlreadyConnected = 1431001, kError_Inbox_ThreadsUnavailable = 1415002, kError_OpenId_CancelResponse = 1428010, kError_OpenId_SetupNeededResponse = 1428011, kError_Payment_CreditCardError = 1353008, kError_FBPayments_InvalidOperation = 1383004, kError_FBPayments_PermissionDenied = 1383005, kError_FBPayments_DatabaseError = 1383006, kError_FBPayments_InvalidApp = 1383007, kError_FBPayments_AppNoResponse = 1383008, kError_FBPayments_AppErrorResponse = 1383009, kError_FBPayments_UserCanceled = 1383010, kError_FBPayments_Disabled = 1383011, kError_Wall_RateLimitExceeded = 1367004, kError_Async_Roadblocked = 1357011, kError_Gigaboxx_InvalidFolder = 1441008, kError_Gifts_GiftsWithCreditsGlobalLimitExceeded = 1391027, kError_Login_LsdFailed = 1348035, kError_Payment_CaptchaFailed = 1353010, kError_Payment_SecurityRestriction = 1353011, kError_OpenId_EmailAlreadyTakenLinkAccounts = 1428016, kError_UIErrorForm_HasErrors = 1460001;
if (!this.JSON) {
	this.JSON = function () {
		function f(n) {
			return n < 10 ? "0" + n : n;
		}
		Date.prototype.toJSON = function () {
			return this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z";
		};
		var m = {"\b":"\\b", "\t":"\\t", "\n":"\\n", "\f":"\\f", "\r":"\\r", "\"":"\\\"", "\\":"\\\\"};
		function stringify(value, whitelist) {
			var a, i, k, l, v;
			switch (typeof value) {
			  case "string":
				return (new RegExp("[\x00-\x1f\\\\\"]")).test(value) ? "\"" + value.replace(/[\x00-\x1f\\"]/g, function (a) {
					var c = m[a];
					if (c) {
						return c;
					}
					c = a.charCodeAt();
					return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
				}) + "\"" : "\"" + value + "\"";
			  case "number":
				return isFinite(value) ? String(value) : "null";
			  case "boolean":
				return String(value);
			  case "null":
				return "null";
			  case "object":
				if (DOM.isNode(value)) {
					return null;
				}
				if (!value) {
					return "null";
				}
				if (typeof value.toJSON === "function") {
					return stringify(value.toJSON());
				}
				a = [];
				if (typeof value.length === "number" && !(propertyIsEnumerable(value, "length"))) {
					l = value.length;
					for (i = 0; i < l; i += 1) {
						a.push(stringify(value[i], whitelist) || "null");
					}
					return "[" + a.join(",") + "]";
				}
				if (whitelist) {
					l = whitelist.length;
					for (i = 0; i < l; i += 1) {
						k = whitelist[i];
						if (typeof k === "string") {
							v = stringify(value[k], whitelist);
							if (v) {
								a.push(stringify(k) + ":" + v);
							}
						}
					}
				} else {
					for (k in value) {
						if (typeof k === "string") {
							v = stringify(value[k], whitelist);
							if (v) {
								a.push(stringify(k) + ":" + v);
							}
						}
					}
				}
				return "{" + a.join(",") + "}";
			}
		}
		return {stringify:stringify, parse:function (text, filter) {
			var j;
			function walk(k, v) {
				var i, n;
				if (v && typeof v === "object") {
					for (i in v) {
						if (Object.prototype.hasOwnProperty.apply(v, [i])) {
							n = walk(i, v[i]);
							if (n !== undefined) {
								v[i] = n;
							}
						}
					}
				}
				return filter(k, v);
			}
			if (text && /^[\],:{}\s]*$/.test(text.replace(/\\./g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
				j = eval("(" + text + ")");
				return typeof filter === "function" ? walk("", j) : j;
			}
			throw new SyntaxError("decodeJSON");
		}};
	}();
}
this.JSON.encode = this.JSON.stringify;
this.JSON.decode = this.JSON.parse;
function propertyIsEnumerable(o, p) {
	if (o.propertyIsEnumerable) {
		return o.propertyIsEnumerable(p);
	}
	for (var prop in o) {
		if (prop == p) {
			return true;
		}
	}
	return false;
}
if (window.Bootloader) {
	Bootloader.done(["js/5h4heo2ub68sogs4.pkg.js"]);
}

